﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MyCloudEntity;
using MyDBHelper;
using System.Data.SqlClient;

namespace MyCloudDAL
{
    public class TUserFileRecord
    {
        public int InsertRecord(string usrSSID, string fileName)
        {
            int i = 0;
            try
            {
                i = SQLHelper.ExecuteNonQuery("insert into [dbo].[TUserFileRecord] values(NEWID(),@ussid,@fname,'/ bhvFiles/'+@ussid,'123',0)",
                new SqlParameter[] {
                  new SqlParameter("@ussid",usrSSID),
                  new SqlParameter("@fname",fileName)
                });
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return i;
        }
    }
}
